import React from 'react';
import './PolicyAnalysis.css';

interface PolicyAnalysisProps {
  title: string;
  department: string;
  date: string;
  content: string;
  analysis: string;
  opportunities: string[];
}

const PolicyAnalysis: React.FC<PolicyAnalysisProps> = ({ 
  title,
  department,
  date,
  content,
  analysis,
  opportunities
}) => {
  return (
    <div className="policy-card">
      <div className="policy-header">
        <h3 className="policy-title">{title}</h3>
        <div className="policy-meta">
          <span className="policy-department">{department}</span>
          <span className="policy-date">{date}</span>
        </div>
      </div>
      
      <div className="policy-content">
        <h4>政策内容</h4>
        <p>{content}</p>
      </div>
      
      <div className="policy-analysis">
        <h4>专业分析</h4>
        <p>{analysis}</p>
      </div>
      
      {opportunities.length > 0 && (
        <div className="investment-opportunities">
          <h4>投资机会</h4>
          <ul>
            {opportunities.map((opp, index) => (
              <li key={index}>{opp}</li>
            ))}
          </ul>
        </div>
      )}
    </div>
  );
};

export default PolicyAnalysis;